home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / man / lib.fmt / c / getlogin.man < prev    next >
Encoding:
Text File  |  1989-01-05  |  1.3 KB  |  67 lines

  1.  
  2.  
  3.  
  4. GETLOGIN              C Library Procedures               GETLOGIN
  5.  
  6.  
  7.  
  8. NNAAMMEE
  9.      getlogin - get login name
  10.  
  11. SSYYNNOOPPSSIISS
  12.      cchhaarr **ggeettllooggiinn(())
  13.  
  14. DDEESSCCRRIIPPTTIIOONN
  15.      _G_e_t_l_o_g_i_n returns a pointer to the login name as found in
  16.      /_e_t_c/_u_t_m_p.  It may be used in conjunction with _g_e_t_p_w_n_a_m to
  17.      locate the correct password file entry when the same userid
  18.      is shared by several login names.
  19.  
  20.      If _g_e_t_l_o_g_i_n is called within a process that is not attached
  21.      to a terminal, or if there is no entry in /_e_t_c/_u_t_m_p for the
  22.      process's terminal, _g_e_t_l_o_g_i_n returns a NULL pointer (0).  A
  23.      reasonable procedure for determining the login name is to
  24.      first call _g_e_t_l_o_g_i_n and if it fails, to call
  25.      _g_e_t_p_w_u_i_d(_g_e_t_u_i_d()).
  26.  
  27. FFIILLEESS
  28.      /etc/utmp
  29.  
  30. SSEEEE AALLSSOO
  31.      getpwent(3), utmp(5), ttyslot(3)
  32.  
  33. DDIIAAGGNNOOSSTTIICCSS
  34.      Returns a NULL pointer (0) if name not found.
  35.  
  36. BBUUGGSS
  37.      The return values point to static data whose content is
  38.      overwritten by each call.
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63. Sprite v1.0                May 9, 1986                          1
  64.  
  65.  
  66.  
  67.